\hypertarget{classpentester_1_1hosts_1_1ifconfig_1_1IFConfig}{
\section{IFConfig Class Reference}
\label{classpentester_1_1hosts_1_1ifconfig_1_1IFConfig}\index{pentester::hosts::ifconfig::IFConfig@{pentester::hosts::ifconfig::IFConfig}}
}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
def \hyperlink{classpentester_1_1hosts_1_1ifconfig_1_1IFConfig_c775ee34451fdfa742b318538164070e}{\_\-\_\-init\_\-\_\-}
\item 
def \hyperlink{classpentester_1_1hosts_1_1ifconfig_1_1IFConfig_f11fe66bce12bb31e6beddd02904d9dd}{get\_\-ip\_\-address}
\item 
def \hyperlink{classpentester_1_1hosts_1_1ifconfig_1_1IFConfig_5b7f182fe5cb9b6edce7df1c4871d654}{get\_\-netmask}
\item 
def \hyperlink{classpentester_1_1hosts_1_1ifconfig_1_1IFConfig_d812a904a9c74b13565677501fb2b333}{get\_\-ifaces\_\-up}
\item 
def \hyperlink{classpentester_1_1hosts_1_1ifconfig_1_1IFConfig_b5625a555b6a86de3037153166ff64e4}{long2cidr}
\end{CompactItemize}


\subsection{Detailed Description}


\footnotesize\begin{verbatim}Pozwala odczytać informacje o interfejsach sieciowych
    takie jak adres IP oraz maska podsieci\end{verbatim}
\normalsize
 

Definition at line 8 of file ifconfig.py.

\subsection{Member Function Documentation}
\hypertarget{classpentester_1_1hosts_1_1ifconfig_1_1IFConfig_c775ee34451fdfa742b318538164070e}{
\index{pentester::hosts::ifconfig::IFConfig@{pentester::hosts::ifconfig::IFConfig}!\_\-\_\-init\_\-\_\-@{\_\-\_\-init\_\-\_\-}}
\index{\_\-\_\-init\_\-\_\-@{\_\-\_\-init\_\-\_\-}!pentester::hosts::ifconfig::IFConfig@{pentester::hosts::ifconfig::IFConfig}}
\subsubsection[\_\-\_\-init\_\-\_\-]{\setlength{\rightskip}{0pt plus 5cm}def \_\-\_\-init\_\-\_\- ( {\em self})}}
\label{classpentester_1_1hosts_1_1ifconfig_1_1IFConfig_c775ee34451fdfa742b318538164070e}




Definition at line 11 of file ifconfig.py.\hypertarget{classpentester_1_1hosts_1_1ifconfig_1_1IFConfig_f11fe66bce12bb31e6beddd02904d9dd}{
\index{pentester::hosts::ifconfig::IFConfig@{pentester::hosts::ifconfig::IFConfig}!get\_\-ip\_\-address@{get\_\-ip\_\-address}}
\index{get\_\-ip\_\-address@{get\_\-ip\_\-address}!pentester::hosts::ifconfig::IFConfig@{pentester::hosts::ifconfig::IFConfig}}
\subsubsection[get\_\-ip\_\-address]{\setlength{\rightskip}{0pt plus 5cm}def get\_\-ip\_\-address ( {\em ifname})}}
\label{classpentester_1_1hosts_1_1ifconfig_1_1IFConfig_f11fe66bce12bb31e6beddd02904d9dd}




\footnotesize\begin{verbatim}
Queries Linux kernel for IP addres of the particular interface
chosen by passing mandatory "ifname" argument. Returns string 
containing IP addres in dotted-decimal format (eg. '4.2.2.2')
\end{verbatim}
\normalsize
 

Definition at line 15 of file ifconfig.py.\hypertarget{classpentester_1_1hosts_1_1ifconfig_1_1IFConfig_5b7f182fe5cb9b6edce7df1c4871d654}{
\index{pentester::hosts::ifconfig::IFConfig@{pentester::hosts::ifconfig::IFConfig}!get\_\-netmask@{get\_\-netmask}}
\index{get\_\-netmask@{get\_\-netmask}!pentester::hosts::ifconfig::IFConfig@{pentester::hosts::ifconfig::IFConfig}}
\subsubsection[get\_\-netmask]{\setlength{\rightskip}{0pt plus 5cm}def get\_\-netmask ( {\em ifname}, \/   {\em long} = {\tt False})}}
\label{classpentester_1_1hosts_1_1ifconfig_1_1IFConfig_5b7f182fe5cb9b6edce7df1c4871d654}




\footnotesize\begin{verbatim}
Queries Linux kernel for netmask of the interface "ifname".
ifname argument should be given as a canonical name of the network interface
such as "eth0", "lo" etc. Method returns string containing netmask value
in one of two well known formats. If you pass True value as "long" argument
it will return netmask in long format (e.g. '255.255.255.0'). Otherwise
If you give 'False' value as "long" argument it will return netmask of
the interface in CIDR notation (eg. '/24') 
\end{verbatim}
\normalsize
 

Definition at line 28 of file ifconfig.py.\hypertarget{classpentester_1_1hosts_1_1ifconfig_1_1IFConfig_d812a904a9c74b13565677501fb2b333}{
\index{pentester::hosts::ifconfig::IFConfig@{pentester::hosts::ifconfig::IFConfig}!get\_\-ifaces\_\-up@{get\_\-ifaces\_\-up}}
\index{get\_\-ifaces\_\-up@{get\_\-ifaces\_\-up}!pentester::hosts::ifconfig::IFConfig@{pentester::hosts::ifconfig::IFConfig}}
\subsubsection[get\_\-ifaces\_\-up]{\setlength{\rightskip}{0pt plus 5cm}def get\_\-ifaces\_\-up ()}}
\label{classpentester_1_1hosts_1_1ifconfig_1_1IFConfig_d812a904a9c74b13565677501fb2b333}




\footnotesize\begin{verbatim}
Queries Linux kernel for structure containing various information about
installed network interfaces. Returns list of strings with names of
interfaces (only those that are currently in the "up" state).
\end{verbatim}
\normalsize
 

Definition at line 48 of file ifconfig.py.\hypertarget{classpentester_1_1hosts_1_1ifconfig_1_1IFConfig_b5625a555b6a86de3037153166ff64e4}{
\index{pentester::hosts::ifconfig::IFConfig@{pentester::hosts::ifconfig::IFConfig}!long2cidr@{long2cidr}}
\index{long2cidr@{long2cidr}!pentester::hosts::ifconfig::IFConfig@{pentester::hosts::ifconfig::IFConfig}}
\subsubsection[long2cidr]{\setlength{\rightskip}{0pt plus 5cm}def long2cidr ( {\em longmask})}}
\label{classpentester_1_1hosts_1_1ifconfig_1_1IFConfig_b5625a555b6a86de3037153166ff64e4}




\footnotesize\begin{verbatim}
Converts specified network mask in long format to CIDR (Classless Inter-Domain Routing)
format. For example if you pass "255.255.255.0" string as an argument, it will return string
"/24"
\end{verbatim}
\normalsize
 

Definition at line 62 of file ifconfig.py.

The documentation for this class was generated from the following file:\begin{CompactItemize}
\item 
\hyperlink{ifconfig_8py}{ifconfig.py}\end{CompactItemize}
